xquery version "1.0";
declare variable $titre as xs:string external;
declare variable $tag_filtre1 as xs:string external;
declare variable $tag_filtre2 as xs:string external;

<html>
<head>
	<link rel='stylesheet' media='screen' type='text/css' href='../design.css' />
</head>
<body>
<div class="droite_haut">
<h1>{$titre}</h1>
    {   
		for $f1 in distinct-values(doc("fic/citations.xml")//*[local-name() eq $tag_filtre1])
		return
		<ul class="{$f1}"><a id="txt_f1" name="{$f1}"></a><h3>{$f1}</h3>{
			for $f2 in distinct-values(doc("fic/citations.xml")//citation[*[local-name() eq $tag_filtre1]=$f1]/*[local-name() eq $tag_filtre2])
			return 
			<li>
			    <a id="lien_f2" href="frame3.html#{$f1}" target="droit_bas">{$tag_filtre2} : {$f2}</a>
			</li> 
	    }
	    </ul>
    }
</div>
</body>
</html>
